
function login(){
    var path = getRealPath()+"/userServlet";
    var userPassword = $("#userPassword").val();
    var userLoginName = $("#userLoginName").val();
    $.ajax({
        url: path,
        data:{
            action:"login",
            userLoginName:userLoginName,
            userPassword:userPassword
        },
        method: "POST",
        dataType: "json",
        success: function (result) {
            if(result.status == 1){
                window.location.href=getRealPath()+"/index?action=getshowlist";
            }else {
                alert(result.message);
            }
        }
    });
}